Exporting Date fields to text includes time format due to design.





In Access, dates are automatically stored with the date plus time. During the export process, both date and time are exported. This is by design of Microsoft Access. Note that if there is no time data, Access still displays all zeros (indicating 12 A.M.) as the time.



To work around this behavior, export the data as a fixed-width text file and set the length of the Date field to eight characters to eliminate the time portion of the field during export.

NOTE: Exported text files do not preserve any formatting. To keep the datasheet's font and other formatting, export all or a portion of the table or query as a Rich Text Format file.

    1) Open the desired database.
    2) If the Database window is not active, activate the Database window.
    3) In the Database window, choose the appropriate tab.
    4) Select the table or query to export.
    5) Select the 'File' menu and select 'Save As/Export...'. (The Save As... dialog box appears.)
    6) Select the 'To an external File or Database' radio button.
    < the To an external File or Database radio button >
    7) Choose 'OK'. (The Save < object > < object name > In dialog box appears, where < object > is the selected object type and < object name > is the name of the selected object.)
    8) Select 'Text Files (*.txt, *.csv, *.tab, *.asc )' from the 'Save as type' drop-down list box.
    < Selecting the Text file type >
    9) Select the drive where the exported text file is to be stored from the 'Save in' drop-down list.
    10) Select the specific folder to store the text file from the 'Save in' list box.
    NOTE: If the text file is to be stored to a subfolder, continue selecting folders until the desired folder is displayed in the 'Save in' drop-down list box.
    11) Do one of the following:

      a) Enter a name for the file in the 'File name' drop-down list box.
      b) Accept the name suggested by Access.

    12) Choose the 'Export' button. (The Text Export Wizard dialog box appears.)
    < Specifying the exported file >
    13) Select the 'Fixed Width' button to align the data in text columns.
    < the Fixed Width button >
    14) Choose the 'Next' button.
    15) Move the arrow line to set the length of the Date field to exactly eight characters.
    NOTE: Each unit in the line in the middle of the 'Text Export Wizard' dialog box represents a character.
    < Exporting a fixed-width text file >
    16) Choose the 'Next' button.
    17) Do one of the following in the 'Export to File' box:
    18) Choose the 'Finish' button to start the text export process.
    19) Choose 'OK' when the export is complete.


Knowledge-Pak Desktop Suite (TM) Edition 5
Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved.



2nd Opinion copyright © 1997 by McAfee Associates.
Subject to the terms set forth in the end-user license agreement. All rights reserved.